package com.sys.service.impl;


import com.sys.mapper.RoleMapper;
import com.sys.mapper.UserMapper;
import com.sys.model.Role;
import com.sys.model.User;
import com.sys.service.UserService;
import org.apache.commons.lang.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;

@Service("userService")
public class UserServiceImpl implements UserService {
	@Autowired
	private UserMapper userMapper;
	public List<User> selectUsersByRoleId(String roleId) {
		if(!StringUtils.isEmpty(roleId)){
			roleId = "%"+roleId+"%";
		}
		return userMapper.selectByRoleId(roleId);
	}
}

